#ifndef MODBUS_MANAGER_H
#define MODBUS_MANAGER_H

#include "rclcpp/rclcpp.hpp"
#include <mutex>

#include "modbus_communication.h"
#include "modbus_slave.h"

using namespace std;

/*定义一个Master manager功能的类*/
class MasterManager:public rclcpp::Node
{
public:

    MasterManager(const rclcpp::NodeOptions& options);
    ~MasterManager();
    void create_tree_branch(std::string prefix, int max);
    void init();
    
private:
    bool initParam();
    std::vector<ModbusCommunication *> m_ModbusHandles; 
};

#endif